--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit b4c656770ff78c0048df5be2b05ebf15f0d77629
Parents : d3ddfd6
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-12-29T14:37:18+01:00
Strip unrenderable unicode sequences in info box
Changes
Diff
diff --git a/nomadnet/ui/textui/Network.py b/nomadnet/ui/textui/Network.py
index 242118d..fcf2a4e 100644
--- a/nomadnet/ui/textui/Network.py
+++ b/nomadnet/ui/textui/Network.py
@@ -85,7 +85,7 @@ class AnnounceInfo(urwid.WidgetWrap):
type_string = "Peer " + g["peer"]
try:
- data_str = announce[2].decode("utf-8")
+ data_str = strip_modifiers(announce[2].decode("utf-8"))
data_style = ""
if trust_level != DirectoryEntry.TRUSTED and len(data_str) > 32:
data_str = data_str[:32]+" [...]"
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────